package com.hotel.controller;

import com.hotel.pojo.Room;
import com.hotel.service.RoomService;
import com.hotel.vo.PageResult;
import com.hotel.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/room")
public class RoomController {
    @Autowired
    private RoomService roomService;
    @GetMapping("/getRoomList")
    public SysResult getRoomList(PageResult pageResult){
        pageResult = roomService.getRoomList(pageResult);
        return SysResult.success(pageResult);
    }
    }

